const {Sequelize,DataTypes} = require('sequelize')
const sequelize = require('./init')

const Camera = sequelize.define('Camera',{
    id:{
        type: DataTypes.UUID,
        defaultValue: Sequelize.UUIDV4,
        primaryKey:true
    },
    ip:DataTypes.TEXT,
    port:DataTypes.TEXT,
    userName:{
        type:DataTypes.TEXT,
        field:'user_name'
    },
    password:DataTypes.TEXT,
    channel:DataTypes.TEXT,
    url:DataTypes.TEXT,
    remark:DataTypes.TEXT,
    status:DataTypes.NUMBER
},{
    tableName:'mn_camera',
    timestamps:false
})

module.exports = Camera